3.6.1 Main function
1 A program shall contain a global function called main, which is the designated start of the program. It is
implementationdefined
whether a program in a freestanding environment is required to define a main
function. [Note: in a freestanding environment, startup
and termination is implementationdefined;
startup
contains the execution of constructors for objects of namespace scope with static storage duration; termination
contains the execution of destructors for objects with static storage duration. ]
2 An implementation shall not predefine the main function.
This function shall not be overloaded. It shall
have a return type of type int, but otherwise its type is implementationdefined.
All implementations
shall allow both of the following definitions of main:
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ }